export interface ResponseData {
  code: string | number
  message: string
  ok: boolean
}

// -----------------------------品牌模块
//品牌单个数据
export interface TradeMark {
  id?: number
  tmName?: string
  logoUrl?: string
  code?: ''
  name?: ''
}

//品牌数据数组
export type Records = TradeMark[]

//响应的数据结构
export interface TradeMarkResponseData extends ResponseData {
  data: {
    records: Records
    total: number
    size: number
    current: number
    searchCount: boolean
    pages: number
  }
}

// -----------------------------三级分类下拉联动数据
export interface AttributeCate {
  id: number | string
  name: string
  category1Id?: number
  category2Id?: number
}

export type AttributeCateList = AttributeCate[]
// -----------------------------属性模块

export interface AttributeCateResponseData extends ResponseData {
  data: AttributeCateList
}

// 属性列表
export type AttrList = Attr[]
export interface Attr {
  id?: number
  catename: string
  categoryId: number | string
  categoryLevel: number
  attrValueList: AttrValueList
}

export type AttrValueList = AttrValue[]
export interface AttrValue {
  id?: number
  valueName: string
  attrId?: number
}

export interface AttributeListResponseData extends ResponseData {
  data: AttrList
}

// -----------------------------SPU模块

// SPU列表
export type SpuList = Spu[]
export interface Spu {
  id?: number | string
  spuName: string
  description: string
  category3Id: number | string
  tmId: number | string
  spuSaleAttrList: any
  spuImageList: any
}

export interface SpuListResponseData extends ResponseData {
  data: {
    records: SpuList
    total: number
    size: number
    current: number
    searchCount: boolean
    pages: number
  }
}
